import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format="%(message)s --%(asctime)s",handlers=[
        logging.StreamHandler(),
        logging.FileHandler("log.txt")
    ])
def mail_send(filepath):
    mail=yagmail.SMTP(user="1105906242@qq.com",password="khkiysvitfdzjjjf",host="smtp.qq.com")
    mail.send(to="1105906242@qq.com",subject="1212121",contents="2323232",attachments=filepath)